package com.xbongbong.paas.elasticsearch.pojo.dto;

import com.xbongbong.paas.enums.DelEnum;
import com.xbongbong.paas.toolbox.wrap.BaseDTO;
import com.xbongbong.paas.toolbox.wrap.QueryIgnore;
import com.xbongbong.paas.field.LinkListPojo;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.elasticsearch.search.builder.SearchSourceBuilder;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * @author: wufeng
 * @date: 2018/12/20 14:26
 * @desrcption: 获取当前表单的关联列表的数据
 */
@Getter
@Setter
@ToString
public class AssociationListDataDTO extends BaseDTO {
    private static final long serialVersionUID = 3400340786760787842L;


    @NotNull(message = "关联列表应用appId不能为空")
    @Valid
    @Getter(onMethod_ = {@QueryIgnore})
    private LinkListPojo linkList;
    /**
     * 当前表单关联数据的id
     */
    @Getter(onMethod_ = {@QueryIgnore})
    @NotNull(message = "当前数据的id不能为空")
    private Long dataId;

    /**
     * 分页当前页
     */
    @Getter(onMethod_ = {@QueryIgnore})
    private Integer page;

    /**
     * 分页每页记录数
     */
    @Getter(onMethod_ = {@QueryIgnore})
    private Integer pageSize;

    private Integer del;

    @Getter(onMethod_ = {@QueryIgnore})
    private SearchSourceBuilder sourceBuilder;

    /**
     * 显示的字段
     */
    private List<String> fieldList;
    @Getter(onMethod_ = {@QueryIgnore})
    private Integer businessType;
    @Getter(onMethod_ = {@QueryIgnore})
    private Integer saasMark;


    public AssociationListDataDTO(){
        del = DelEnum.NORMAL.getDel();
        page = 1;
        pageSize = 10;
    }
}
